<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file = "check.jsp" %>
<%@ include file = "conn.jsp" %>
<%
String info = request.getParameter("resumeid");
int resume_id = -1;

if (info != null) {
	resume_id = Integer.valueOf(info);
}

ResultSet rs = null;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>中文的个人简历- 应届生求职网 </title>
<script src="./js/globals.js" language="javascript" type="text/javascript"></script>
<script src="./js/ajax.js" language="javascript" type="text/javascript"></script>
<script src="./js/category.js" language="javascript" type="text/javascript"></script>
<script src="./js/control.js" language="javascript" type="text/javascript"></script>
<script src="./js/checks.js" language="javascript" type="text/javascript"></script>
<script src="./js/display_resume.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var Ajax_prefix = '/';
var jslang = {
	'certified'				:	'图形码错误\n\n1: 您还没有填写图形码.\n2: 您填写的图形码字符不正确. \n3: 您的图形码已失效, 单击图片替换图片形码.',
	'unlogined'				:	'您还没有登陆或登陆已过期, 请重新登陆',
	'unchecked'				:	'您的企业资料尚未通过审核，此时我们无法让您进行该操作。\n请将贵公司的工商营业执照加盖公章传真至021-51716286或021-61675983（请附上用户名和联系方式）\n传真后请在“管理中心”页面中点击“我已传真，请查收”按钮。',	'comments'				:	true,	'comments_certid'		:	true,'comments_unknown'		:	'无效请求',
	'comments_nomessage'	:	'错误: 您请还没有填写评语内容',
	'comments_confirm'		:	'您是否确定要提交评语记录',
	'comments_success'		:	'恭喜您! 您的评语已经发表完成',
	'resumer_address'		:	'/index.php/display/resume/1791945.htm',
	'resumer_notfound'		:	'您查询的数据不存在, 请返回',
	'resumer_maxium'		:	'您的企业简历库可存储空间已满, 请申请新服务或清理您的简历库',
	'resumer_repeat'		:	'该简历已经存储在您的简历库中, 请不要重复操作',
	'resumer_adder_confirm'	:	'您是否确定要将该简历加入到您的企业简历库',
	'resumer_adder_invalid'	:	'您没有权限添加该简历到您的简历库',
	'resumer_adder_success'	:	'恭喜您! 您已经将该简历加入到您的企业简历库',
	'resumer_facer_confirm' :	'您是否确定要将该简历加入到您的企业面试夹',
	'resumer_facer_success' :	'您选定的简历加入面试夹已经完成',
	'resumer_facer_repeat'	:	'该简历已经加入到您的面试夹, 请不要重复添加',
	'resumer_facer_fail' 	:	'display_resume_facer_fail',
	'resumer_buyer_confirm'	:	'您是否确定要查看该简历',
	'resumer_buyer_invalid'	:	'您的企业可查看简历已经用完了, 暂不能继续查看简历 ',
	'resumer_buyer_expire'	:	'对不起，您的服务期限已到',
	'resumer_buyer_success'	:	'恭喜您! 您已经查看了该简历(加入到您的简历库)'
}
function change_style(aa){
	if(aa==2){
		document.body.style.background = "#444";
	}
	else if(aa==3){
		document.body.style.background = "#feecc4";
	}
	else if(aa==4){
		document.body.style.background = "#eee";
	}
	else{
		document.body.style.background = "#226995";
	}
}
</script><link href="./css/display_resume.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="chose"><span class="chose_style"><input name="Button1" type="button" value="" onclick="change_style('1')" class="btn1"><input name="Button2" type="button" value="" onclick="change_style('2')" class="btn2"><input name="Button3" type="button" value="" onclick="change_style('3')" class="btn3"><input name="Button4" type="button" value="" onclick="change_style('4')" class="btn4"></span></div><div class="resume">
		<div class="closed"><a href="#" onclick="window.close();return false;">[关闭窗口]</a></div>
	    <div class="logo">更新时间 2012-06-04</div>
		<table class="top">
		 <tr>
		<td style="text-align:left;"><a href="http://my.yingjiesheng.com/upload/1206/4548283_1339515426.gif" target="_blank"><img src="http://my.yingjiesheng.com/upload/1206/4548283_1339515426.gif" alt="中文"  border="0" /></a></td><td><p><span>中文</span>(女 23 所在地:江苏 南通, 户口:江西 九江 )</p><p>长江大学 MBA 历史学<br />		 <br />13456789098 (手机)&nbsp;&nbsp;<br />deter2003@gmail.com<br /></p></td>
		 </tr>
		 </table>
<%
    String sql = "SELECT * FROM education WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    boolean display = true;

    while(rs.next()) {

        if (rs.getBoolean("edu_prop") == false) {
            continue;
		    }

        String school = rs.getString("school");

        if (school == null || school.length() < 1) {
            school = rs.getString("tschool2");
        }

	    String ddpc = rs.getString("ddpc");
	    
	    if (ddpc == null || ddpc.length() < 1) {
	    	ddpc = rs.getString("tdpb");
	    }

	    String desc = rs.getString("edutext");
	    
	    if (desc == null || desc.length() < 1) {
	    	desc = "无";
	    }
	    
	    if (display) {
	    	display = false;
%>
<div class="header">教育经历</div>
<%
} %>
<div class="education">
	<p><span class="r"><strong><%= rs.getInt("syear") %>-<%= rs.getInt("smonth") %>到<%= rs.getInt("eyear") %>-<%= rs.getInt("emonth") %></strong></span>
		<strong><%= school + "  " + ddpc %></strong>
		<span class="middle"><strong><%= rs.getString("edu_bg") %></strong></span></p>
			<p><%= desc %></p>
</div>
<%}
    sql = "SELECT * FROM award WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("award_prop") == false) {
            continue;
            }
        
        if (display) {
        	display = false;
%>
<div class="header">获奖情况</div>
<table cellpadding="0" cellspacing="0" border="0">
<%}%>
	<tr>
		<td style="width:15%"><%= rs.getInt("year") %>-<%= rs.getInt("month") %></td>
		<td><%= rs.getString("award_desc") %></td>
	</tr>
<%}
    if (display == false) {
%>
</table>
<%}
    sql = "SELECT * FROM experience WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("exp_prop") == false) {
            continue;
            }
        
        if (display) {
        	display = false;
%>
<div class="header">兼职实习及工作经历</div>
<%      }%>
<div class="education">
    <p>
	    <span class="r">
	        <strong>从<%= rs.getInt("syear") %>-<%= rs.getInt("smonth") %>到<%= rs.getInt("eyear") %>-<%= rs.getInt("emonth") %></strong>
	    </span>
	    <strong><%= rs.getString("company") %></strong>
	    <span class="middle">
	        <strong><%= rs.getString("depart") %></strong>
	    </span>
    </p>
    <p><%= rs.getString("worktext") %></p>
</div>
<%}
    sql = "SELECT * FROM program WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("property") == false) {
            continue;
            }
        
        String software = rs.getString("software");
        String hardware = rs.getString("project");
        String developer = rs.getString("developer");

        if (display) {
        	display = false;
%>
<div class="header">项目经验</div>
<%      }%>
<div class="education">
    <p>
        <span class="r"><strong>从<%= rs.getInt("syear") %>-<%= rs.getInt("smonth") %>到<%= rs.getInt("eyear") %>-<%= rs.getInt("emonth") %></strong></span>
        <strong><%= rs.getString("project") %></strong>
        <% if (software != null && software.length() > 1) { %>
        &nbsp;<span><strong><%= software %></strong></span> <%} %>
        <% if (hardware != null && hardware.length() > 1) { %>
        &nbsp;<span><strong><%= hardware %></strong></span> <%} %>
        <% if (developer != null && developer.length() > 1) { %>
        &nbsp;<span><strong><%= developer %></strong></span> <%} %>
    </p>
</div>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td style="width:15%;vertical-align:top;">项目描述：</td>
		<td><%= rs.getString("introduce") %></td>
	</tr>
	<tr>
		<td style="width:15%;vertical-align:top;">责任描述：</td>
		<td><%= rs.getString("responsibility") %></td>
	</tr>
</table>
<%
}
    sql = "SELECT assn_prop, assn_desc FROM assn WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("assn_prop") == false) {
            continue;
            }

        if (display) {
            display = false;
%>
<div class="header">社团、学生会实践经历</div>
<%      }%>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td  style="width:15%">活动描述：</td>
		<td><%= rs.getString("assn_desc") %></td>
	</tr>
</table>
<%
}
    sql = "SELECT language.lang_prop, language.laname, cate_langcert1.list_name, cate_langcert2.list_name, cate_skillable.list_name FROM language LEFT " +
    	  "JOIN cate_langcert1 ON language.langid1 = cate_langcert1.id " +
    	  "JOIN cate_langcert2 ON language.langid2 = cate_langcert2.id " +
    	  "JOIN cate_skillable ON language.ableid = cate_skillable.id WHERE language.resume_id = " + resume_id;

    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("language.lang_prop") == false) {
            continue;
            }

        String laname = rs.getString("laname");

        if (display) {
            display = false;
%>
<div class="header">语言能力</div>
<table cellpadding="0" cellspacing="0" border="0">
<%} %>
    <tr>
        <td><%= (laname != null && laname.length() > 1) ? laname : rs.getString("cate_langcert1.list_name") %></td>
        <td> 所获证书: <%= (laname != null && laname.length() > 1) ? "" : rs.getString("cate_langcert2.list_name") %> </td>
        <td> 口语熟练程度:  <%= rs.getString("cate_skillable.list_name") %></td>
    </tr>
<%}
    if (display == false) {
%>
</table>
<%}
    sql = "SELECT iter.property, iter.month, cate_iterb.list_name, cate_skillable.list_name FROM iter LEFT " +
    	  "JOIN cate_iterb ON iter.iterb = cate_iterb.id " +
    	  "JOIN cate_skillable ON iter.ableid = cate_skillable.id WHERE resume_id = " + resume_id; 

    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("iter.property") == false) {
            continue;
            }

        if (display) {
            display = false;
%>
<div class="header">IT技能</div>
<table cellpadding="0" cellspacing="0" border="0">
<%      }%>
	<tr>
		<td><%= rs.getString("cate_iterb.list_name") %></td>
		<td><%= rs.getInt("iter.month") %> (月)</td>
		<td><%= rs.getString("cate_skillable.list_name") %></td>
	</tr>
<%}
    if (display == false) {
%>
</table>
<%}
    sql = "SELECT * FROM train WHERE resume_id = " + resume_id; 
    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("train_prop") == false) {
            continue;
            }

        String address = rs.getString("address");
        String  certificate = rs.getString("certificate");
        String traintext = rs.getString("traintext");

        if (display) {
            display = false;
%>
<div class="header">培训经历</div>
<%      }%>
<div class="education">
<p>
<span class="r"><strong>从<%= rs.getInt("syear") %>-<%= rs.getInt("smonth") %>到<%= rs.getInt("eyear") %>-<%= rs.getInt("emonth") %></strong></span>
<strong><%= rs.getString("organize") %>  <% if (address != null && address.length() > 1) { %><%= address %><%} %></strong>
<span class="middle"><strong><%= rs.getString("lesson") %></strong></span>
<span class="middle"><strong><% if (certificate != null && certificate.length() > 1) { %><%= certificate %><%} %></strong></span>
</p>
<p><% if (traintext != null && traintext.length() > 1) { %><%= traintext %><%} %></p>
</div>
<%
}
    sql = "SELECT certificate.cert_prop, certificate.dcerc, certificate.grade, certificate.smonth, certificate.syear, cate_cerb.list_name FROM certificate LEFT "
        + "JOIN cate_cerb ON certificate.dcerb = cate_cerb.id WHERE certificate.resume_id = " + resume_id;

    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("certificate.cert_prop") == false) {
            continue;
            }

        String dcerc = rs.getString("certificate.dcerc");
        String grade = rs.getString("certificate.grade");

        if (display) {
            display = false;
%>
<div class="header">所获证书</div>
<table cellpadding="0" cellspacing="0" border="0">
<%      }%>
	<tr>
		<td><%= rs.getInt("certificate.syear") %>-<%= rs.getInt("certificate.smonth") %></td>
		<td><%= (dcerc != null && dcerc.length() > 1) ? dcerc : rs.getString("cate_cerb.list_name") %></td>
		<td><%= (grade != null && grade.length() > 1) ? grade : "无" %></td>
	</tr>
<%}
    if (display == false) {
%>
</table>
<%
}
    sql = "SELECT append.append_prop, append.appendname, append.appendtext, cate_append.list_name FROM append LEFT "
    	+ "JOIN cate_append ON append.appendid = cate_append.id WHERE append.resume_id = " + resume_id;

    rs = stmt.executeQuery(sql);
    display = true;

    while(rs.next()) {

        if (rs.getBoolean("append.append_prop") == false) {
            continue;
            }

        String appendname = rs.getString("append.appendname");

        if (display) {
            display = false;
%>
<div class="header">简历附加信息</div>
<table cellpadding="0" cellspacing="0" border="0">
<%      }%>
    <tr>
        <td style="width:15%;vertical-align:top;"><%= (appendname != null && appendname.length() > 1) ? appendname : rs.getString("cate_append.list_name") %>：</td>
        <td><%= rs.getString("append.appendtext") %></td>
    </tr>
<%}
    if (display == false) {
%>
</table>
<%
}
    sql = "SELECT resume.mulplace, resume.mulindustry, resume.muljobstype, " +
          "cate_salaryid.list_name, cate_jobskinds.list_name FROM resume LEFT " +
          "JOIN cate_salaryid ON resume.salaryid = cate_salaryid.id " +
          "JOIN cate_jobskinds ON resume.jobskinds = cate_jobskinds.id WHERE resume.id = " + resume_id;

    rs = stmt.executeQuery(sql);
    
    if(rs.next()) {
%>
<div class="header">求职意向</div>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td style="width:15%;">工作性质：</td>
		<td><%= rs.getString("cate_jobskinds.list_name") %></td>
	</tr>
	<tr>
		<td>从事行业：</td>
		<td><%= rs.getString("resume.mulindustry") %></td>
	</tr>
	<tr>
		<td>职能职位：</td>
		<td><%= rs.getString("resume.muljobstype") %></td>
	</tr>
	<tr>
		<td>工作地点：</td>
		<td><%= rs.getString("resume.mulplace") %></td>
	</tr>
	<tr>
		<td>期望月薪：</td>
		<td><%= rs.getString("cate_salaryid.list_name") %> (元)</td>
	</tr>
</table>
<%
}
stmt.close();
conn.close();
%>
	</div>
	<script src="./js/extents.js" language="javascript" type="text/javascript"></script>
	<iframe id="ajaxform" name="ajaxform" src="about:blank" width="0" height="0"></iframe>
</body>
</html>
